<template lang="html">
  <div class="top-back">
    <div class="top-back-left" @click='proPageClick'>
      <i class="iconfont icon-fanhui" ></i>
      <span>返回</span>
    </div>
    <div class="top-back-right">{{ topBackText.rightText }}</div>
    <div class="top-back-center">{{ topBackText.centerText }}</div>
  </div>
</template>

<script>
export default {
  name:'TopBack',
  props:{
    topBackText:{
      type:Object,
      default:function(){
        return{}
      }
    }
  },
  methods:{
    proPageClick(event){
      window.history.back()
    }
  }
}
</script>

<style lang="less" scoped>
.top-back{
  width: 100%;
  height: 0.88rem;
  background-color: #44bf91;
  position: relative;
  line-height: 0.88rem;
  color: #fff;
  font-size: 0.36rem;
  .top-back-left{
    padding-left: 0.2rem;
    box-sizing: border-box;
    height: 0.48rem;
    text-align: center;
    position: absolute;
    left: 0;
    height: 100%;
  }
  .top-back-right{
    position: absolute;
    right: 0;
    margin-right: 0.2rem;
    height: 100%;
  }
  .top-back-center{
    width: 100%;
    height: 100%;
    text-align: center;
  }
}
</style>
